set msg "test of zlib tools\n\n"

proc op { file} {
  global fout
  set id [thread::create [subst { set fout [zlib push gzip [open $file wb]]}]] 
#  set fout [zlib push gzip [open $file wb]]
  return id
}
proc send {msg} {
  set id 
}
set file tozip.file
set fin [open $file rb]
set msg [read $fin ]
#set header [dict create \
#        filename $file time [file mtime $file] comment "Created by Tcl[info patchlevel]"]
set header "type text"
#set fout [zlib push gzip [open $file.gz wb]]
set id [op $file.gz]
puts $fout $msg
#error "happend"
#close $fout
